package com.ruoyi.backend.service.impl.orderManagementImpl;

import com.ruoyi.backend.domain.orderManagement.Order;
import com.ruoyi.backend.mapper.orderManagement.RepairOrderMapper;
import com.ruoyi.backend.service.orderManagement.IRepairOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 洗车订单Service业务层处理
 *
 * @author 王冰冰
 * @date 2025-03-19
 */
@Service
public class RepairOrderServiceImpl implements IRepairOrderService {
    @Autowired
    private RepairOrderMapper repairOrderMapper;

    /**
     * 查询洗车订单
     *
     * @param orderId 洗车订单主键
     * @return 洗车订单
     */
    @Override
    public Order selectOrderMByOrderId(Long orderId) {
        return repairOrderMapper.selectOrderMByOrderId(orderId);
    }

    /**
     * 查询洗车订单列表
     *
     * @param order 洗车订单
     * @return 洗车订单
     */
    @Override
    public List<Order> selectOrderMList(Order order) {
        return repairOrderMapper.selectOrderMList(order);
    }

    /**
     * 新增洗车订单
     *
     * @param order 洗车订单
     * @return 结果
     */
    @Override
    public int insertOrderM(Order order) {
        return repairOrderMapper.insertOrderM(order);
    }

    /**
     * 修改洗车订单
     *
     * @param order 洗车订单
     * @return 结果
     */
    @Override
    public int updateOrderM(Order order) {
        return repairOrderMapper.updateOrderM(order);
    }

    /**
     * 批量删除洗车订单
     *
     * @param orderIds 需要删除的洗车订单主键
     * @return 结果
     */
    @Override
    public int deleteOrderMByOrderIds(Long[] orderIds) {
        return repairOrderMapper.deleteOrderMByOrderIds(orderIds);
    }

    /**
     * 删除洗车订单信息
     *
     * @param orderId 洗车订单主键
     * @return 结果
     */
    @Override
    public int deleteOrderMByOrderId(Long orderId) {
        return repairOrderMapper.deleteOrderMByOrderId(orderId);
    }
}